package com.example.java_chatroom_redis_rabbitmq.service;

import com.example.java_chatroom_redis_rabbitmq.mapper.UserMapper;
import com.example.java_chatroom_redis_rabbitmq.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;
    public User queryUserByUserName(String userName) {
        return userMapper.queryUserByUserName(userName);
    }

    public Integer addUser(String userName,String password,String image,String tag) {
        return userMapper.addUser(userName,password,image,tag);
    }

    public User queryUserByUserId(Integer userId) {
        return userMapper.queryUserByUserId(userId);
    }

    public Integer updateUserTag(Integer userId,String tag) {
        return userMapper.updateUserTag(userId,tag);
    }
}
